package com.kmxd.ams.client.search.dto;

import com.kmxd.ams.core.common.enums.FieldOrderTypeEnum;
import com.kmxd.ams.core.common.enums.QuickSearchEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * 快速检索
 *
 * @author nickbi
 */
@Schema(description = "快速检索")
@Data
public class QuickSearchDTO implements Serializable {

  @Schema(description = "是否智能分词")
  private Boolean participle = false;

  @Schema(description = "包含所有关键字")
  private Boolean includeAll = false;

  @Schema(description = "检索类型:1原文,2目录")
  @NotNull(message = "检索类型不能为空")
  private QuickSearchEnum type;

  @Schema(description = "包含子单位")
  private Boolean containsSubunits;

  @Schema(description = "单位id")
  private String orgIds;

  @Schema(description = "检索内容")
  private String keyword;

  @Schema(description = "标题")
  private String title;

  @Schema(description = "单位")
  private String fondsIds;

  @Schema(description = "年度")
  private String years;

  @Schema(description = "机构")
  private String deptIds;

  @Schema(description = "门类")
  private String archTypeIds;

  @NotNull(message = "页数不能为空")
  @Schema(description = "页数")
  private Integer page;

  @NotNull(message = "分页不能为空")
  @Schema(description = "分页大小")
  private Integer size;

  @Schema(description = "时间排序")
  private FieldOrderTypeEnum orderByDate;

  @Schema(description = "相关性排序")
  private FieldOrderTypeEnum orderByScore;
}
